<script setup>

const player = ref();


const props = defineProps({
  url: String
})

onMounted(() => {
  // player.value = new FlvPlayer({
  //   id: 'video',
  //   url: props.url,
  //   height: 450,
  //   width: null,
  //   isLive: true,
  //   playsinline: true,
  // });
  player.value = new window.Player({
    id: 'video',
    url: props.url,
    height: 450,
    width: null,
    isLive: true,
    playsinline: true,
  });
})

onBeforeUnmount(() => player.value.destroy())


</script>

<template>
  <div id="video" class="rounded"></div>
</template>

<style scoped>

</style>
